package com.tbsoft.trail.route;

import org.apache.camel.builder.RouteBuilder;

import com.tbsoft.core.process.AbstractProcess;
/**
 * @desc 业务定义路由
 * @author lizhenhua
 *
 */
public class TrailRouteBuilder extends RouteBuilder{

	@Override 
	public void configure() throws Exception {
		from("jetty:http://0.0.0.0:7001/order")
		.setHeader(AbstractProcess.MSG_CORRELATE_ID, xpath("/customer/@cid"))
		.to("direct:monitor-A")
		.processRef("xmlResolveBean")
		//.to("bean:xmlResolveBean?method=process")
		.to("direct:monitor-B")
		.processRef("xmlMergeBean")
		//.to("bean:xmlMergeBean?method=process")
		.to("direct:monitor-C")
		.to("jms:queue:mergedQueue")
		;
		from("jms:queue:mergedQueue")
		.processRef("actionBeanContext")
		;
	}

}
